package com.wanxi.product.controller;


import com.wanxi.product.entity.Result;
import com.wanxi.product.vo.ProductAttributeVo;
import com.wanxi.product.vo.ProductFindAllVo;
import com.wanxi.product.vo.ProductVo;
import com.wanxi.product.vo.StateVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;


@Api(tags = "商品")
@RestController
@RequestMapping("/product")
public class ProductController {

    @ApiOperation("查询所有商品")
    @GetMapping("/findProductAll")
    public Result findProductAll(ProductFindAllVo productFindAllVo) {
        return new  Result("",0,new ProductFindAllVo(),0);
    }

    @ApiOperation("/商品公共信息")
    @PostMapping("/addProduct")
    public Result addProduct(ProductAttributeVo ProductAttributeVo){
        return new Result("",0,new StateVo(),1);
    }

    @ApiOperation("/商品属性")
    @PostMapping("/writeProduct")
    public Result writeProduct(ProductVo productVo){
        return new Result("",0,new StateVo(),1);
    }

    @ApiOperation("编辑得到商品id")
    @GetMapping("/findById")
    public Result findById(@RequestParam("商品id") int id){
        return new Result("",0,new StateVo(),1);
    }

    @ApiOperation("编辑商品")
    @PostMapping("/edit")
    public Result edit(ProductVo ProductVo){
       return new Result("",0,new StateVo(),1);
    }

    @ApiOperation("删除商品")
    @PostMapping("/delete")
    public Result delete(@RequestParam("商品id") int id){
        return new Result("",0,new StateVo(),1);
    }
}
